import request from '@/utils/request'

// 查询订单销售列表
export function listOrdersale(query) {
  return request({
    url: '/ordersale/ordersale/list',
    method: 'get',
    params: query
  })
}

// 查询订单销售详细
export function getOrdersale(orderSaleId) {
  return request({
    url: '/ordersale/ordersale/' + orderSaleId,
    method: 'get'
  })
}

// 新增订单销售
export function addOrdersale(data) {
  return request({
    url: '/ordersale/ordersale',
    method: 'post',
    data: data
  })
}

// 修改订单销售
export function updateOrdersale(data) {
  return request({
    url: '/ordersale/ordersale',
    method: 'put',
    data: data
  })
}

// 删除订单销售
export function delOrdersale(orderSaleId) {
  return request({
    url: '/ordersale/ordersale/' + orderSaleId,
    method: 'delete'
  })
}
